package com.huan.iteye.controller;

import com.huan.iteye.crawler.IteyeBlogCrawler;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 爬虫控制类
 *
 * @author huan.fu
 * @date 2018/9/13 - 11:51
 */
@RestController
@RequestMapping("crawler")
public class CrawlerController {

	@Autowired
	private IteyeBlogCrawler iteyeBlogCrawler;

	/**
	 * 执行爬虫
	 *
	 * @param workDate
	 */
	@GetMapping("iteye")
	public void iteyeCrawler(String workDate) {
		iteyeBlogCrawler.crawler(workDate);
	}

}
